import React from 'react';
import {Button, Input, Select, Table} from 'antd';
import type { TableProps } from 'antd';
interface DataType {
  key: string;
  name: string;
  age: number;
  address: string;
  tags: string[];
}
import Indict from './indict'


const LeftTable: React.FC = () =>{
  let ChildRef = React.createRef();
  const clickB = () => {
    ChildRef.current.showModal()
  }

  const columns: TableProps<DataType>['columns'] = [
    {
      title: '危',
      dataIndex: 'name',
      key: 'name',
      width: 30,
    },
    {
      title: '急',
      key: 'no',
      width: 30,
    },
    {
      title: '复',
      ellipsis: true,
      key: 'updateTime',
      width: 30,
    },
    {
      title: '审',
      ellipsis: true,
      key: 'adminName',
      width: 30,
    },
    {
      title: '印',
      ellipsis: true,
      key: 'contractType',
      width: 30,
    },
    {
      title: '标本日期',
      ellipsis: true,
      key: 'contractType',
      width: 90,
    },
    {
      title: '标本号',
      ellipsis: true,
      key: 'contractType',
      width: 90,
    },{
      title: '病人姓名',
      ellipsis: true,
      key: 'contractType',
      width: 90,
    },{
      title: '病人号',
      ellipsis: true,
      key: 'contractType',
      width: 90,
    },{
      title: '性别',
      ellipsis: true,
      key: 'contractType',
      width: 40,
    },{
      title: '年龄',
      ellipsis: true,
      key: 'contractType',
      width: 40,
    },
  ];

  const data: DataType[] = [
    {
      key: '1',
      name: '张',
      age: 32,
      address: 'New York No. 1 Lake Park',
      tags: ['nice', 'developer'],
    },
  ];

  return(<div>
    <Indict />
    <div>
      <Button type="primary" style={{marginLeft: '6px'}}>刷新</Button>
      <Button type="primary" style={{marginLeft: '6px'}}>删除</Button>
      <Select
        defaultValue="1"
        style={{ width: 120 }}
        options={[
          { value: '1', label: '条件1' },
          { value: '2', label: '2' },
          { value: '3', label: '3' },
          { value: '4', label: '4' },
          { value: '5', label: '5' },
        ]}
      />
      <Input placeholder="请输入" style={{width: '120px'}}/>
    </div>
    <Table columns={columns} dataSource={data} pagination={false} scroll={{ x: 'max-content' }}/>
    <div>
      <a>审：130</a>
      <a style={{marginLeft: '8px'}}>未审：60</a>
      <a style={{marginLeft: '8px'}}>1/190</a>
      <a style={{marginLeft: '8px'}}>待复查： 0</a>
      <a style={{marginLeft: '8px'}}>已复查：5</a>
    </div>
  </div>)
}

export default LeftTable;
